#ifndef __losor_declaration_h__
#define __losor_declaration_h__

#include "type.h"
#include "symbol.h"
#include <list.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _lex_info lex_info;

int         declaration( lex_info *lex );
int         declaration_specifiers( lex_info *lex, vartype *vt );
int         init_declarator_list( lex_info *lex, vartype *ty );
int         init_declarator( lex_info *lex, vartype *ty );
vartype*    storage_class_specifier( lex_info *lex, vartype *ty );
symbol*     struct_or_union_specifier( lex_info *lex );
list*       struct_declaration_list( lex_info *lex );
list*       struct_declaration( lex_info *lex );
vartype*    specifier_qualifier_list( lex_info *lex );
list*       struct_declarator_list( lex_info *lex, vartype *vt );
symbol*     struct_declarator( lex_info *lex, vartype *vt );
//vartype*    type_specifier( lex_info *lex, vartype *ty );
symbol*     enum_specifier( lex_info *lex );
list*       enumerator_list( lex_info *lex );
symbol*     enumerator( lex_info *lex );
//vartype*    type_qualifier( lex_info *lex, vartype *ty );
//vartype*    function_specifier( lex_info *lex, vartype *ty );
vartype*    type_name( lex_info *lex );
vartype*    abstract_declarator( lex_info *lex, vartype *ty );
vartype*    direct_abstract_declarator( lex_info *lex, vartype *ty );
symbol*     declarator( lex_info *lex, vartype *ty );
symbol*     direct_declarator( lex_info *lex, vartype *ty );
vartype*    pointer( lex_info *lex, vartype *ty );
vartype*    type_qualifier_list( lex_info *lex, vartype *ty );
list*       parameter_type_list( lex_info *lex );
list*       parameter_list( lex_info *lex );
vartype*    parameter_declaration( lex_info *lex );
list*       identifier_list( lex_info *lex );
int         initializer( lex_info *lex );
int         initializer_list( lex_info *lex );
int         designation( lex_info *lex );
int         designator_list( lex_info *lex );
int         designator( lex_info *lex );

#ifdef __cplusplus
};
#endif

#endif // __losor_declaration_h__
